package com.wy17113.model.service.impl;

import java.sql.SQLException;
import java.util.List;

import com.wy17113.model.dao.IScoreRecordDao;
import com.wy17113.model.entity.ScoreRecord;
import com.wy17113.model.service.IScoreRecordService;

public class ScoreRecordServiceImpl implements IScoreRecordService {

	private IScoreRecordDao scoreRecordDao;
	
	public IScoreRecordDao getScoreRecordDao() {
		return scoreRecordDao;
	}

	public void setScoreRecordDao(IScoreRecordDao scoreRecordDao) {
		this.scoreRecordDao = scoreRecordDao;
	}
	
	//////////////////////////////////////////////////////////
	
	public String getUserIdByAccount(String account) {
		return scoreRecordDao.getUserIdByAccount(account);
	}

	public int getSumScoreByState(int state,String id) {
		return scoreRecordDao.getSumScoreByState(state,id);
	}

	public List<ScoreRecord> getAllScoreRecord(String uid, int scoreType,
			int state, String startTime, String endTime, int start, int count) {
		return scoreRecordDao.getAllScoreRecord(uid, scoreType, state, startTime, endTime, start, count);
	}

	public int getAllScoreRecordCounts(String uid, int scoreType, int state,
			String startTime, String endTime) {
		return scoreRecordDao.getAllScoreRecordCounts(uid, scoreType, state, startTime, endTime);
	}

	public void updateScoreecordState(int state,String srId) throws SQLException {
		scoreRecordDao.updateScoreecordState(state,srId);
	}

}
